ComponentOne Data Source for Entity Framework
C1.LiveLinq.LiveViews Namespace / View<T> Class / AttachAggregationView Method / AttachAggregationView<TResult>(Object,Func<View<T>,AggregationView<T,TResult>>) Method
The type of the elements in the aggregation subview.
A string uniquely specifying this subquery in the view to which it is attached. Can be any string. The only requirement is that different subqueries attached to the same view, if such exist, must have different subquery ids.
A function to obtain the attached aggregation subview from the view to which it is attached.

In This Topic
    AttachAggregationView<TResult>(Object,Func<View<T>,AggregationView<T,TResult>>) Method
    In This Topic
    Includes an aggregation subquery into the incremental maintenance mechanism of a view and uniquely identifies it among other subqueries of the same view.
    Syntax
    'Declaration
     
    
    Public Overloads Function AttachAggregationView(Of TResult)( _
       ByVal subqueryId As System.Object, _
       ByVal selector As System.Func(Of View(Of T),AggregationView(Of T,TResult)) _
    ) As AggregationView(Of T,TResult)
    public AggregationView<T,TResult> AttachAggregationView<TResult>( 
       System.object subqueryId,
       System.Func<View<T>,AggregationView<T,TResult>> selector
    )

    Parameters

    subqueryId
    A string uniquely specifying this subquery in the view to which it is attached. Can be any string. The only requirement is that different subqueries attached to the same view, if such exist, must have different subquery ids.
    selector
    A function to obtain the attached aggregation subview from the view to which it is attached.

    Type Parameters

    TResult
    The type of the elements in the aggregation subview.

    Return Value

    The attached aggregation subview.
    Remarks

    This overload must be used if you have several subviews attached to the same view. The subqueryId' can be any string as long as it is not repeated for two different subviews attached to the same view.

    See the other overload for the explanation of the AttachAggregationView method.

    See Also